package com.gtw.modules.sys.service.impl;

import com.gtw.modules.dao.TbBannerDao;
import com.gtw.modules.entity.TbBanner;
import com.gtw.modules.sys.service.SysBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/** Banner 接口实现类
 * Created by wuye on 2018/2/6.
 */
@Service
public class SysBannerServiceImpl implements SysBannerService{

    @Autowired
    private TbBannerDao bannerDao;

    @Override
    public TbBanner queryObject(Integer id){
        return bannerDao.queryObject(id);
    }

    @Override
    public List<TbBanner> queryList(Map<String, Object> map){
        return bannerDao.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map){
        return bannerDao.queryTotal(map);
    }

    @Override
    public void save(TbBanner banner){
        bannerDao.save(banner);
    }

    @Override
    public void update(TbBanner banner){
        bannerDao.updateByPrimaryKey(banner);
    }

    @Override
    public void delete(Integer id){
        bannerDao.delete(id);
    }

    @Override
    public void deleteBatch(Integer[] ids){
        bannerDao.deleteBatch(ids);
    }
}
